package sort;

import org.apache.hadoop.io.NullWritable;
import org.apache.hadoop.mapreduce.Reducer;

import java.io.IOException;

/**
 * @author LIAO
 * create  2021-05-20 21:35
 * Reducer<KEYIN,VALUEIN,KEYOUT,VALUEOUT>
 *     KEYIN  MySortBean
 *     VALUEIN NullWritable
 *     KEYOUT  MySortBean
 *     VALUEOUT  NullWritable
 */
public class SortReducer extends Reducer<MySortBean,NullWritable,MySortBean,NullWritable>{
    @Override
    protected void reduce(MySortBean key, Iterable<NullWritable> values, Context context) throws IOException, InterruptedException {
        //将map节点的结果拿过来进行了汇总，写出到文件中
        context.write(key,NullWritable.get());
    }
}
